[PATCH] <short summary of the patch>
authorCamm Maguire <camm@debian.org>
Fri, 22 May 2026 15:34:58 +0000 (15:34 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 5 Jul 2026 18:49:40 +0000 (14:49 -0400)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

Gbp-Pq: Name Version_2_7_2pre24

18 files changed:
Makefile.am
Makefile.in
cmpnew/gcl_cmpfun.lsp
cmpnew/gcl_cmpopt.lsp
configure
configure.ac
git.tag
h/hppa-linux.h
h/m68k-linux.h
h/mach64_aarch64_reloc.h
h/powerpc-linux.h
h/sh4-linux.h
lsp/gcl_mislib.lsp
o/alloc.c
o/funlink.c
o/sfaslcoff.c
o/sfaslelf.c
o/sfaslmacho.c

index 234a2c5695338198c67a61ab0264626d1c8a7ccd..958d0215a5e6a750cb1ca0192ec42a60f467816c 100644 (file)
@@ -272,8 +272,11 @@ unixport/raw_%: unixport/lib%.a $(FF) $(LF)
                  $(CC) \
                      $$(otool -l $@ | bin/mac_arm_relink ps=$(SEGMENT_ALIGNMENT_BITS) base=$(TEXT_BASE)) \
                      $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS) && \
-                 ("$$(printf '%s\n1167\n' $$(ld -v  2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1) | sort -V |head -n 1)"  != "1167" || \
-                       ( printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
+                 (  LV=$$(ld -v  2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1); \
+                     echo "Linker version $$LV" ; \
+                     [ "$$(printf '%s\n1167\n' $$LV | sort -r -V |head -n 1)"  != "1167" ] || \
+                       ( echo "Patching" ; \
+                          printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
                          codesign -s - --force $@ )))
 
 unixport/gcl_cmpnopt_gcl_gprof.lsp unixport/gcl_cmpnopt_ansi_gcl_gprof.lsp:\
index 14686a75fed077c26712e76671b6a913f1cb544e..c2de22067ad134b04b0356f5c02c96fe903f7bab 100644 (file)
@@ -4584,8 +4584,11 @@ unixport/raw_%: unixport/lib%.a $(FF) $(LF)
                  $(CC) \
                      $$(otool -l $@ | bin/mac_arm_relink ps=$(SEGMENT_ALIGNMENT_BITS) base=$(TEXT_BASE)) \
                      $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS) && \
-                 ("$$(printf '%s\n1167\n' $$(ld -v  2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1) | sort -V |head -n 1)"  != "1167" || \
-                       ( printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
+                 (  LV=$$(ld -v  2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1); \
+                     echo "Linker version $$LV" ; \
+                     [ "$$(printf '%s\n1167\n' $$LV | sort -r -V |head -n 1)"  != "1167" ] || \
+                       ( echo "Patching" ; \
+                          printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
                          codesign -s - --force $@ )))
 
 unixport/gcl_cmpnopt_gcl_gprof.lsp unixport/gcl_cmpnopt_ansi_gcl_gprof.lsp:\
index 0d86c6a0d0dc9c94151342c83b0f50f71df88531..9832a4a653fc220104f6528ee5861dd7fd62eb93 100644 (file)
                cadddr cdaddr cddadr cdddar cddddr logand lognot logior logxor c-type complex-real
                complex-imag ratio-numerator ratio-denominator cnum-type si::number-plus si::number-minus
                si::number-times si::number-divide ;FIXME more
+               si::expand-deftype
                ,@(mapcar (lambda (x) (cdr x)) (remove-if-not (lambda (x) (symbolp (cdr x))) +cmp-type-alist+))))
   (si::putprop l t 'c1no-side-effects))
 
index ae129442ac49a07e639431fd47103bff44db67a5..533800c58dd3416e14ca03b0296eeaf7874323c6 100644 (file)
    (get 'truncate 'inline-always))
 (push '((fixnum) (returns-exactly fixnum fixnum) #.(flags rfa)"({fixnum _t=(#0);@1(#0)-_t@ _t;})")
    (get 'truncate 'inline-always))
-(push '((short-float) (returns-exactly fixnum short-float) #.(flags rfa)"({float _t=(#0);@1(#0)-_t@ _t;})")
+(push '((short-float) (returns-exactly fixnum short-float) #.(flags rfa)"({fixnum _t=(#0);@1(#0)-_t@ _t;})")
    (get 'truncate 'inline-always))
-(push '((long-float) (returns-exactly fixnum long-float) #.(flags rfa)"({double _t=(#0);@1(#0)-_t@ _t;})")
+(push '((long-float) (returns-exactly fixnum long-float) #.(flags rfa)"({fixnum _t=(#0);@1(#0)-_t@ _t;})")
    (get 'truncate 'inline-always))
 
 ;;COMPLEXP
index 6e928787965f2127659985f165a9371e4c8f1488..1e0bcd3f3f886f545a102361374300d44c78a153 100755 (executable)
--- a/configure
+++ b/configure
@@ -4189,6 +4189,10 @@ if test "$use" = "gnuwin95" ; then
 
    libboot="no"
 fi
+case $use in
+   *86*gnu) libboot="no";;
+esac
+
 
  if test "$libboot" = "yes"; then
   AMM_LIBBOOT_TRUE=
@@ -7210,7 +7214,8 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
                    -Wall \
                    -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
-                   -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
+                   -Wno-unused-but-set-variable -Wno-tautological-compare \
+                   -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
                    -fbracket-depth=512
 
 add_args_to_ldflags -no-pie -Wl,-z,relro # -Wl,-z,lazy
@@ -8858,10 +8863,10 @@ fi
 
 
 case $use in
-    sh4*) ;;     #FIXME, these exceptions needed as of gcc 4.7
-    hppa*) ;;    #FIXME
-    powerpc*) ;; #FIXME
-    alpha*) ;;   #FIXME
+#    sh4*) ;;     #FIXME, these exceptions needed as of gcc 4.7
+#    hppa*) ;;    #FIXME
+#    powerpc*) ;; #FIXME
+#    alpha*) ;;   #FIXME
     ia64*) ;;    #FIXME
     *)
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking __builtin___clear_cache" >&5
@@ -8880,8 +8885,8 @@ int
 main (void)
 {
 
-                       void *v,*ve;
-                       __builtin___clear_cache(v,ve);
+                       char v[1<<12];
+                       __builtin___clear_cache(v,v+sizeof(v));
 
   ;
   return 0;
index 999f5cce40c66b7c34b41f4c4eafa868503ba40e..088ea65fe043be6e5bdf64c888968a85f02ab83d 100644 (file)
@@ -82,6 +82,10 @@ if test "$use" = "gnuwin95" ; then
    AC_SUBST(LF)
    libboot="no"
 fi
+case $use in
+   *86*gnu) libboot="no";;
+esac
+
 
 AM_CONDITIONAL([AMM_LIBBOOT],[test "$libboot" = "yes"])
 if test "$libboot" = "yes" ; then
@@ -276,7 +280,8 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
                    -Wall \
                    -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
-                   -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
+                   -Wno-unused-but-set-variable -Wno-tautological-compare \
+                   -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
                    -fbracket-depth=512
 
 add_args_to_ldflags -no-pie -Wl,-z,relro # -Wl,-z,lazy
@@ -830,19 +835,19 @@ AC_RUN_IFELSE(
 
 
 case $use in
-    sh4*) ;;     #FIXME, these exceptions needed as of gcc 4.7
-    hppa*) ;;    #FIXME
-    powerpc*) ;; #FIXME
-    alpha*) ;;   #FIXME
+#    sh4*) ;;     #FIXME, these exceptions needed as of gcc 4.7
+#    hppa*) ;;    #FIXME
+#    powerpc*) ;; #FIXME
+#    alpha*) ;;   #FIXME
     ia64*) ;;    #FIXME
     *)
-       AC_MSG_CHECKING(__builtin___clear_cache)
+       AC_MSG_CHECKING([__builtin___clear_cache])
        AC_RUN_IFELSE(
            [AC_LANG_PROGRAM(
                    [[]],
                    [[
-                       void *v,*ve;
-                       __builtin___clear_cache(v,ve);
+                       char v[1<<12];
+                       __builtin___clear_cache(v,v+sizeof(v));
                    ]])],
            [AC_DEFINE(HAVE_BUILTIN_CLEAR_CACHE,1,[have __builtin__clear_cache instruction])
             AC_MSG_RESULT(yes)],
diff --git a/git.tag b/git.tag
index a56169f87176b189eaeedfa11bf6ace7b07483d0..b73496cbcb7f3825a3869e846ccfac9670e7d0d3 100644 (file)
--- a/git.tag
+++ b/git.tag
@@ -1 +1 @@
-"Version_2_7_2pre23"
+"Version_2_7_2pre24"
index 9a7eb6ed0b889b1ed3f10b689e77223b0d5e17ec..9c4861a97fd33a56d505cac957015164daeaf0f8 100755 (executable)
@@ -3,17 +3,17 @@
 #define SGC
 #define STATIC_FUNCTION_POINTERS
 
-#ifdef IN_SFASL
-#include <sys/mman.h>
-#define CLEAR_CACHE_LINE_SIZE 32
-#define CLEAR_CACHE {\
-   void *v1=memory->cfd.cfd_start,*v,*ve=v1+memory->cfd.cfd_size;      \
-   v1=(void *)((unsigned long)v1 & ~(CLEAR_CACHE_LINE_SIZE - 1));\
-   for (v=v1;v<ve;v+=CLEAR_CACHE_LINE_SIZE) asm __volatile__ ("fdc 0(%0)" : : "r" (v) : "memory");\
-   asm __volatile__ ("syncdma\n\tsync" : : "r" (v) : "memory");\
-   for (v=v1;v<ve;v+=CLEAR_CACHE_LINE_SIZE) asm __volatile__ ("fic 0(%%sr4,%0)" : : "r" (v) : "memory");\
-   asm __volatile__ ("syncdma\n\tsync" : : "r" (v) : "memory");}
-#endif
+/* #ifdef IN_SFASL */
+/* #include <sys/mman.h> */
+/* #define CLEAR_CACHE_LINE_SIZE 32 */
+/* #define CLEAR_CACHE {\ */
+/*    void *v1=memory->cfd.cfd_start,*v,*ve=v1+memory->cfd.cfd_size;   \ */
+/*    v1=(void *)((unsigned long)v1 & ~(CLEAR_CACHE_LINE_SIZE - 1));\ */
+/*    for (v=v1;v<ve;v+=CLEAR_CACHE_LINE_SIZE) asm __volatile__ ("fdc 0(%0)" : : "r" (v) : "memory");\ */
+/*    asm __volatile__ ("syncdma\n\tsync" : : "r" (v) : "memory");\ */
+/*    for (v=v1;v<ve;v+=CLEAR_CACHE_LINE_SIZE) asm __volatile__ ("fic 0(%%sr4,%0)" : : "r" (v) : "memory");\ */
+/*    asm __volatile__ ("syncdma\n\tsync" : : "r" (v) : "memory");} */
+/* #endif */
 
 #define RELOC_H "elf32_hppa_reloc.h"
 #define SPECIAL_RELOC_H "elf32_hppa_reloc_special.h"
index 90de745494be3fda764ba9cb20ec7b71cd2b83c4..c986f957253e2bcd19f319981452a51207f59c12 100755 (executable)
 #define        M68K
 /* #define SGC *//*FIXME:  Unknown m68k cpu in modern emulators*/
 
-#include <asm/cachectl.h>
-int cacheflush(void *,int,int,int);
-#define CLEAR_CACHE_LINE_SIZE 32
-#define CLEAR_CACHE do {void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \
-                        v=(void *)((unsigned long)v & ~(CLEAR_CACHE_LINE_SIZE - 1));\
-                        cacheflush(v,FLUSH_SCOPE_PAGE,FLUSH_CACHE_BOTH,ve-v);\
-                    } while(0)
+/* #include <asm/cachectl.h> */
+/* int cacheflush(void *,int,int,int); */
+/* #define CLEAR_CACHE_LINE_SIZE 32 */
+/* #define CLEAR_CACHE do {void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \ */
+/*                         v=(void *)((unsigned long)v & ~(CLEAR_CACHE_LINE_SIZE - 1));\ */
+/*                         cacheflush(v,FLUSH_SCOPE_PAGE,FLUSH_CACHE_BOTH,ve-v);\ */
+/*                     } while(0) */
 
 #define C_GC_OFFSET 2
 
index 15fb35da8bf0c9c022de0293b59da458685545df..75bc3daaf28276c1455c70dfce8d712f092284cd 100644 (file)
     addend=0;
     a&=0xfff;
     a>>=(((*q)>>29)&0x1)*                              /*not add/sub*/
-          ((((*q)>>26)&0x1) ?                          /*simd*/
-          ((((*q)>>22)&0x3) ?
-           (((*q)>>22)&0x3)+1 : (((*q)>>30)&0x1)) :
-          (((*q)>>30)&0x3));                          /*gp*/
+      (((((*q)>>26)&0x1)&&
+        (((*q)>>22)&0x1)&&
+       (!(((*q)>>30)&0x3))) ?                           /*simd hardcode*/
+       4 : (((*q)>>30)&0x3));                          /*gp*/
     store_val(q,MASK(12) << 10, a << 10);
     break;
   case ARM64_RELOC_UNSIGNED:
index cc5fd2d5f8eb9c3921126e04162c4a88a2c7e3a0..e6bc3d0ce131dad82444038ed611d759165de06f 100644 (file)
@@ -2,12 +2,12 @@
 
 #define SGC
 
-#define CLEAR_CACHE_LINE_SIZE 32
-#define CLEAR_CACHE do {void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \
-                        v=(void *)((unsigned long)v & ~(CLEAR_CACHE_LINE_SIZE - 1));\
-                        for (;v<ve;v+=CLEAR_CACHE_LINE_SIZE) \
-                           asm __volatile__ ("dcbst 0,%0\n\tsync\n\ticbi 0,%0\n\tsync\n\tisync": : "r" (v) : "memory");\
-                        } while(0)
+/* #define CLEAR_CACHE_LINE_SIZE 32 */
+/* #define CLEAR_CACHE do {void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \ */
+/*                         v=(void *)((unsigned long)v & ~(CLEAR_CACHE_LINE_SIZE - 1));\ */
+/*                         for (;v<ve;v+=CLEAR_CACHE_LINE_SIZE) \ */
+/*                            asm __volatile__ ("dcbst 0,%0\n\tsync\n\ticbi 0,%0\n\tsync\n\tisync": : "r" (v) : "memory");\ */
+/*                         } while(0) */
 
 #if SIZEOF_LONG == 4
 #define RELOC_H "elf32_ppc_reloc.h"
index a1542edc9755c886a6ab5a59239338ca8b67e22e..ed4d1b4a93859adf2505143ed59dceaa7b848c51 100755 (executable)
@@ -8,14 +8,14 @@
 #define SGC
 
 
-#ifdef IN_SFASL
-#include <sys/mman.h>
-#define CLEAR_CACHE {\
-   void *p=memory->cfd.cfd_start,*pe=p+memory->cfd.cfd_size; \
-   p=(void *)((unsigned long)p & ~(PAGESIZE-1)); \
-   for (;p<pe;p++) /*+=PAGESIZE?*/ asm __volatile__ ("ocbp @%0\n\t": : "r" (p) : "memory");\
-}
-#endif
+/* #ifdef IN_SFASL */
+/* #include <sys/mman.h> */
+/* #define CLEAR_CACHE {\ */
+/*    void *p=memory->cfd.cfd_start,*pe=p+memory->cfd.cfd_size; \ */
+/*    p=(void *)((unsigned long)p & ~(PAGESIZE-1)); \ */
+/*    for (;p<pe;p++) /\*+=PAGESIZE?*\/ asm __volatile__ ("ocbp @%0\n\t": : "r" (p) : "memory");\ */
+/* } */
+/* #endif */
 #define RELOC_H "elf32_sh4_reloc.h"
 
 #define NEED_STACK_CHK_GUARD
index ce629aa713593b4f82b117aecd7e0f197e484bcb..c905dcc79a3a33e838e0ce9ba0fc2cac20fa2eb2 100644 (file)
              (unless tzp (> dstp 0))
              (if tzp tz (+ (truncate (- off) 3600) dstp))))))
 
-(defun encode-universal-time (s n h d m y &optional (tz (this-tz) tzp))
+(defun encode-universal-time (s n h d m y &optional (tz (this-tz) tzp)
+                                           &aux (tzo (* (- tz (this-tz)) 3600)))
   (declare (optimize (safety 2)))
   (check-type s (integer 0 59))
   (check-type n (integer 0 59))
   (check-type h (integer 0 23))
   (check-type d (integer 1 31))
   (check-type m (integer 1 12))
-  (check-type y integer)
+  (check-type y (integer 1899))
   (check-type tz rational)
-  (+ (mktime s n h d (1- m) (- y 1900) (if tzp 0 -1)) +secs-to-1970+ (* (- tz (this-tz)) 3600)))
+  (cond ((eql 1899 y)
+        (assert (and (eql h 23) (eql d 31) (eql m 12)))
+        (+ s (* n 60) tzo))
+       ((+ (mktime s n h d (1- m) (- y 1900) (if tzp 0 -1)) +secs-to-1970+ tzo))))
 
 (defun get-decoded-time ()
   (decode-universal-time (get-universal-time)))
index 743b65528f6c3afff4edfd9375fc9c86c88917d8..fe6715e5f6b94a1f03b39b51219f73eaa56aee6d 100644 (file)
--- a/o/alloc.c
+++ b/o/alloc.c
@@ -1308,7 +1308,7 @@ gcl_init_alloc(void *cs_start) {
       ufixnum k;
       for (p=pagetochar(page(v)),k=0;k<tm->tm_nppage;k++,p+=tm->tm_size) {
        object o=p;
-       if (!is_free(o) && type_of(o)==t_cfdata && (void *)o->cfd.cfd_start>=data_start)
+       if (!is_free(o) && type_of(o)==t_cfdata && !o->d.tt && (void *)o->cfd.cfd_start>=data_start)
          gcl_mprotect((void *)o->cfd.cfd_start,o->cfd.cfd_nexp<<PAGEWIDTH,PROT_READ|PROT_EXEC);
       }
     }
@@ -1707,7 +1707,12 @@ malloc_internal(size_t size) {
     recursive_malloc=1;
     gcl_init_alloc(&size);
     recursive_malloc=0;
-  }
+  } else
+    /*FIXME idempotent but required gcl_init_alloc functions in saved images*/
+#ifdef INITIALIZE_BRK
+    INITIALIZE_BRK;
+#endif
+
 
   CHECK_INTERRUPT;
   
index c6b239be86eaf40c888abb8cb37f9371dc31cb6a..7979efa0aab6bbb1033ba4da25b220fa7c6170cb 100644 (file)
@@ -291,7 +291,7 @@ call_proc_new23(object sym,ufixnum clp,ufixnum vld,void **link,ufixnum argd,obje
        fas=0;
       else if (u.f.va &&(nfargs<fun->fun.fun_minarg || nfargs>fun->fun.fun_maxarg))/*u.f.va -> varg, xxx*/
        fas=0;
-      else if (u.f.va && VFUN_NARGS<0 && fun->fun.fun_minarg==fun->fun.fun_maxarg)/*runtime apply #arg checking omitted in reg fns*/
+      else if (u.f.va && /* VFUN_NARGS<0 &&  */fun->fun.fun_minarg==fun->fun.fun_maxarg)/*runtime apply #arg checking omitted in reg fns*/
        fas=0;
       /* else if (u.f.va && VFUN_NARGS<0 && */
       /*              (nargs-1<fun->fun.fun_minarg || nargs-1>fun->fun.fun_maxarg))/\*u.f.va -> varg, xxx*\/ */
index 7a71336fa71cdd114e5c0396bf81efb9e6eff948..c2d17a821c4e32e217b6a7bb502386a3f14c4a9f 100644 (file)
@@ -488,8 +488,12 @@ fasload(object faslfile) {
 
   massert(!un_mmap(st,est));
 
-#ifdef CLEAR_CACHE
+#if defined(CLEAR_CACHE)
   CLEAR_CACHE;
+#elif defined(HAVE_BUILTIN_CLEAR_CACHE)
+  __builtin___clear_cache((void *)memory->cfd.cfd_start,(void *)memory->cfd.cfd_start+memory->cfd.cfd_size);
+#else
+  #error "No clear cache"
 #endif
 
   if(symbol_value(sLAload_verboseA)!=Cnil) {
index a71c51936098840720613a787e406b19dc3bea67..ae6d7741c4c05475b43445098c3c275f99d60798 100644 (file)
@@ -627,10 +627,12 @@ fasload(object faslfile) {
   
   massert(!clear_protect_memory(memory));
 
-#if defined(HAVE_BUILTIN_CLEAR_CACHE)
-  __builtin___clear_cache((void *)memory->cfd.cfd_start,(void *)memory->cfd.cfd_start+memory->cfd.cfd_size);
-#elif defined(CLEAR_CACHE)
+#if defined(CLEAR_CACHE)
   CLEAR_CACHE;
+#elif defined(HAVE_BUILTIN_CLEAR_CACHE)
+  __builtin___clear_cache((void *)memory->cfd.cfd_start,(void *)memory->cfd.cfd_start+memory->cfd.cfd_size);
+#else
+  #error "No clear cache"
 #endif  
 
   if(symbol_value(sLAload_verboseA)!=Cnil) {
index cbf2c6ae9eb64535e4c863696c2cf87c4c84d499..d41127713b495531d9befc9c9304ebb43d8522bc 100644 (file)
 #define LOAD_SEC(sec) ({ul _fl=sec->flags&SECTION_TYPE;\
       (_fl<=S_SYMBOL_STUBS || _fl==S_16BYTE_LITERALS) && _fl!=S_ZEROFILL && !(sec->flags&S_ATTR_DEBUG);})
 
+#define GCL_EXTERNAL(sym) ((sym)->n_type & N_EXT || \
+                          (((sym)->n_type & N_TYPE) == N_SECT && \
+                           (sym)->n_sect == 1 && \
+                           !memcmp(strtab+(sym)->n_un.n_strx,"___",3)))
 
 #define MASK(n) (~(~0ULL << (n)))
 
@@ -488,7 +492,7 @@ load_self_symbols() {
 
   for (a=c_table.ptable,sym=sym1;sym<syme;sym++) {
     
-    if ((sym->n_type & N_STAB) || !(sym->n_type & N_EXT))
+    if ((sym->n_type & N_STAB) || !GCL_EXTERNAL(sym))
       continue;
 
     a->address=sym->n_value;
@@ -504,7 +508,7 @@ load_self_symbols() {
 
   for (c_table.local_ptable=a,sym=sym1;sym<syme;sym++) {
 
-    if ((sym->n_type & N_STAB) || sym->n_type & N_EXT)
+    if ((sym->n_type & N_STAB) || GCL_EXTERNAL(sym))
       continue;
 
     a->address=sym->n_value;
@@ -645,10 +649,12 @@ fasload(object faslfile) {
   
   massert(!clear_protect_memory(memory));
 
-#if defined(HAVE_BUILTIN_CLEAR_CACHE)
-  __builtin___clear_cache((void *)memory->cfd.cfd_start,(void *)memory->cfd.cfd_start+memory->cfd.cfd_size);
-#elif defined(CLEAR_CACHE)
+#if defined(CLEAR_CACHE)
   CLEAR_CACHE;
+#elif defined(HAVE_BUILTIN_CLEAR_CACHE)
+  __builtin___clear_cache((void *)memory->cfd.cfd_start,(void *)memory->cfd.cfd_start+memory->cfd.cfd_size);
+#else
+  #error "No clear cache"
 #endif
   
   massert(!un_mmap(v1,ve));